package io.geekidea.boot.test.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 卡片
 *
 * @author geekidea
 * @since 2025-03-26
 */
@Data
@TableName("card")
@Schema(description = "卡片")
public class Card implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "车库id")
    private Long carportId;

    @Schema(description = "发片持有人的房号")
    private String houseId;

    @Schema(description = "卡号，年月日+0001（从1递增）")
    private String cardNumber;

    @Schema(description = "车辆id")
    private Long carId;

    @Schema(description = "卡片类型，0：电子卡，1：实体卡")
    private Boolean cardType;

    @Schema(description = "车牌号：自行车没有车牌号，可以为空")
    private String cardNumberNo;

    @Schema(description = "卡片余额，单位为分；当用这个余额来扣除包月卡的金额时，这个金额要扣减")
    private Integer cardMoney;

    @Schema(description = "卡片包月过期时间，实体卡或者充值无值，代表无期限")
    private Date cardDueTime;

    @Schema(description = "创建人ID")
    @TableField(fill = FieldFill.INSERT)
    private Long createId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "修改人ID")
    @TableField(fill = FieldFill.UPDATE)
    private Long updateId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

}

